home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Arsenal Files 6
/
The Arsenal Files 6 (Arsenal Computer).ISO
/
os2
/
nemo10.zip
/
NEMO-OS2.ARV
< prev
next >
Wrap
Text File
|
1996-02-06
|
10KB
|
289 lines
#
# Captain Nemo archiver file
#
# This file is part of the "Captain Nemo" file manager.
# Copyright (C) 1995-1996 by Adam Mirowski
#
# $Id: common.arv 1.7 96/02/02 22:57:39 ROOT_DOS Exp $
#
# This files defines which external programs will be run to perform
# operations on archives, and which arguments will be passed to them.
#
# Format:
# File is divided into sections, one per archive type (format). Each
# section contains an entry per operation type. Comments are indicated
# by a hash in the first column. Empty lines are ignored. Leading and
# trailing blanks are stripped before line analysis.
#
# /<archive-type>
# Introduces an archive type section. <archive-type> can be:
# A for ARC
# J for ARJ
# F for seamless FTP
# G for GZIP
# L for LZH
# T for tar
# U1 for OS/2 UNPACK versions before 3.0
# U2 for OS/2 UNPACK versions starting from 3.0
# O for ZOO
# Z for ZIP
# N is special and causes the section to be ignored. N sections
# can be used to define operations for alternative archivers.
#
# <operation-letter>: <cmds>
# Defines how a specific archive operation should be performed
# for the current archive type, ie. which programs should be run
# and which arguments should be passed to them. It can also define
# the limitations of the archiver program.
#
# <operation-letter> can be:
# I for copy-in (must always store the full pathname)
# O for copy-out (must always restore the full pathname)
# D for mkdir
# U for unlink
# R for rmdir
# L for indicating the limitations of the archiver. This
# is a series of letters, one per limitation:
# A archiver does not restore attributes
# S archiver corrupts the screen content
# T archiver does not restore time/date
# Z archiver does not restore the size
# This will only avoid the warnings. Files will always
# be extracted to the attributes stored in the archive,
# except for the size, in case the archiver performed
# a line-endings translation for text files.
# Limitations indicated using "L:" are internally
# added to the intrinsic limitations of archive formats.
#
# Some additional <operation-letters> are devoted to
# seamless FTP. They are detailed separately below.
#
# <cmds> are the commands to execute. The following predicates can be
# used to insert variable parts into the commands. Predicates
# can be nested as needed.
#
# $A Archive full pathname.
# $F Filename relative to archive root.
# $B Only the base name of filename (without directory component).
# $R Only the directory of filename ("." if there is none).
# $G Debug mode (echo everything to screen). If <cmds> contains
# several commands, this flag is reset after every command:
# it is only valid for the current command.
# $W The password string, if any.
# $U Consider entry as not defined.
# $E(x) "x" evaluated if archive name does not have an extension.
# $P(x) "x" evaluated if file is encrypted or to be encrypted.
# $S(x) "x" evaluated if filename starts with a dash "-".
# $L(x) Convert back-slashes to forward-slashes in "x".
# $I(x) "x" evaluated if the filename is in a subdirectory.
# $D(x) "x" evaluated if the filename is a subdirectory.
# $C(x) Create the "x" directory and all intermediate dirs as well.
# This predicate is always evaluated if present in cmd line.
# It is useful for OS/2 UNPACK and for FTP.
# $$ The dollar sign.
# $) The closing parenthesis sign.
# $n Newline character (ASCII code 10).
# $r Carriage-return character (ASCII code 13).
# $; Command separator if several programs have to be run
# separately. This predicate is always evaluated if
# present in cmd line.
#
# The meaning of generic operations is redefined for seamless
# FTP. Instead of defining the programs to execute, they define
# the FTP commands which will be passed to the FTP client program.
# They can also define defaults for some FTP specific "$" variables.
# Nemo will construct a command file for each I/O/D/U/R operation
# and give it to the FTP utility for execution. Several additional
# <operation-letters> are devoted to seamless FTP:
#
# X for starting the FTP client program. The following
# additional macros are available to construct the
# command line:
# $c the name of a file containing the
# commands to execute.
# $h host name
# $l login name
# $W password
#
# P commands for opening an FTP session.
# They will start any dynamically constructed script.
# Available additional macros are $h, $l, $W and
# their meaning is as for the "X:" operation.
#
# Q commands for closing an FTP session.
#
# C commands for changing the current directory. It will
# be used if the FTP site description uses a non-default
# directory as the initial directory. Available macros:
# $F directory name
#
# T command for getting the current directory content of FTP
# server. Available macros:
# $t file where the listing should be put
#
# l the default login.
#
# W the default password. It can be given in clear or mangled
# (use Shift-F7 to create file containing a mangled password),
# or dynamically asked if you set <ask> as value of "W".
#
# d sets the type of the directory listing. The argument must
# be a single letter:
# U Unix "ls -la"
# O OS/2 FTP server
# N Windows NT and Windows 95 FTP servers.
# "O" and "N" are not yet implemented. Most of the Net
# servers are Unix and if you are on a LAN, it is more
# interesting to mount remote OS/2 or NT disks using
# "NET USE".
#
# Multiple commands should be separated using $r and/or $n.
# (Do not use $; which should be only used for executing
# separate programs.)
#
# There are no <operation-letters> for setting the default value
# of $h (host), $c (FTP command file name) or $t (directory listing
# file name).
#
# A file describing an FTP site must start with
#
# ftp://hostname.domainname/directoryname
#
# then it can redefine nearly any <operation-letter> using the general
# syntax explained above. You cannot redefine the Limitations (L).
#
# The "ftp://" string identifies the file as an FTP site description and
# mount point. It should be at the very beginning of the file. The "ftp://"
# notation is called an URL (Uniform Resource Locator).
#
# If "directoryname" is supposed to be at the root of the remote
# filesystem instead of being relative to the default login directory,
# use a double slash, ie. ftp://hostname.domainname//directoryname.
#
# $Id: nemo-os2.arv 1.8 96/02/06 04:39:28 ROOT_DOS Exp $
#---------- ARC format ----------
# Archiver: arc2 6.00P by SEA
# x = extract, o = overwrite
/A
O: $I($U)arc2 xo $A $F
I: $I($U)arc2 a $A $F
D: $U
U: $I($U)arc2 d $A $F
R: $U
#---------- ARJ format ----------
# ARJ implicitely appends .ARJ if no extension and no dot.
# -y = assume yes on all queries. By default, ARJ asks
# for confirmation before creating directories.
# -a1 = to add even empty dirs
# -g<password> = encrypt/decrypt using <password>
/J
# O: arj x -y$P( -g$W) $A$E(.) $F
O: unarj x $A$E(.)
I: arj a -a1 -y $A$E(.) $F
D: arj a -a1 -y $A$E(.) $F
U: arj d -y $A$E(.) $F
R: arj d -y $A$E(.) $F
#---------- FTP access -------------------
# Commands can be re-defined in .FTP files on a per-site basis.
# This file only sets defaults.
# Note: you may need to tweak this and the sample FTP file
# a little before it works correctly.
#
/F
# X: ftp -s:$c
# X: ftp -s:$c $h
X: ftp $h <$c
# P: open $h$r$n$l$r$n$W$r$n
P: $l$r$n$W$r$n
Q: quit$r$n
C: cd $F$r$n
T: ls -la "$t"$r$n
l: anonymous
W: -joe@
O: bin$r$n$C($R)get "$L($F)" "$L($F)"$r$n
I: bin$r$nput "$L($F)" "$L($F)"$r$n
D: mkdir "$L($F)"$r$n
U: del "$L($F)"$r$n
R: rmdir "$L($F)"$r$n
#---------- GZIP format ---------
# gzip 1.2.4
# There should be a way of uncompressing a GZIP archive without destroying
# it and while restoring the date and the time.
/G
L: T
O: gzip -d -c "$A" > "$F"
I: gzip -c "$F" > "$A"
D: $U
U: echo ï. > "$A"
R: $U
#---------- LZH format ----------
# Archiver: Lh2 by Peter Fitzsimmons, Version 2.22 (32 bit wc).
# Distributed as LH2_222.ZIP. It also contains a 16-bit version.
# Other possibilities (untested): X_OS2_18.EXE, which only unarchives.
# /a - maintain file attributes. Without that special attributes
# will not be stored.
# /s - collect/extract subdirs.
# /o - no prompts.
# /e - save/rest empty dirs & dir EAs(A, M or X)
/L
O: lh32 X $A$E(.) $F /a /o /e
I: lh32 A $A$E(.) $F /a /o
D: lh32 A $A$E(.) $F /a /e /s
U: lh32 D $A$E(.) $F
R: lh32 D $A$E(.) $F
#---------- OS/2 unpack ----------
# Archiver: unpack.exe and unpack2.exe, normally in C:\OS2.
/U1
O: unpack $A $I($R /N:$B $C($R))
/U2
O: unpack2 $A $I($R /N:$B $C($R))
#---------- tar(1) format ----------
# Archiver: GTAK
/T
L: T
O: tar xf $A $L($F)
I: tar rf $A $L($F)
U: tar Df $A $L($F)
#---------- ZIP format ----------
# Archiver: ZIP 2.0.1 and UNZIP 5.0p1 by Info ZIP.
# ZIP needs an ending slash to delete dirs.
# No need to test for relPath being "\\" because cannot delete root
# Do not use -g (grow existing file) unless you decide not to use
# ^C to interrupt suspicious archive operations.
# Unzip does not allow passing the password on command line.
# You could use $G to allow seeing the password prompt.
/Z
# O: unzip -o$P( -e $W) $A "$L($F)"
O: unzip -o $A "$L($F)"
I: zip $A "$F"
D: zip $A "$F"
U: zip -d $A "$F"
R: zip -d $A "$F/"
#---------- ZOO format ----------
# Archiver: zoo 2.1 by Rahul Dhesi
# I used to use just "-extract"
# "e" = extract
# "." = make pathnames relative to "."
# "O" = overwrite without asking
# I used to use just "-add"
# "a" = add; "P" = pack after adding, remove overwritten or
# deleted files (leaves a .bak file, use PP to overwrite it)
# I used to use just "-delete"
# "D" = delete; "P" = pack after deletion, use PP if .bak file exists
/O
O: zoo e.O $A$E(.) $F
I: zoo aPP $A$E(.) $F
D: zoo aPP $A$E(.) $F
U: zoo -delete $A$E(.) $F
# U: zoo D $A$E(.) $F
R: $U